<script type="text/javascript">
$(function(){
//	$.get("inventorymanagement/getFilesInfo",getResponseFilesInfo,"json");
$.post("inventorymanagement/getUserAndBanch",function(json){
		var activeUser = json.activeUser;
		var userNo=activeUser.userNo;
		var branchNo=activeUser.branchNo;
		/* if(branchNo!='10000000'){
			alertMsg.warn("所在网点无权进行操作");	
			return false;
		}else{  */
			$("input[name='tellernumber']").val(userNo);
			$("input[name='netpointnumber']").val(branchNo);
		/* }  */		
})
	$("#queryTaskByRejectDistribute").click(function(){
		var distributeTaskNo = $("#rejectDistributeTaskNoByReceiving").val();
		console.log("配送号===>"+distributeTaskNo);
		if(distributeTaskNo){
			if(distributeTaskNo.length!=10){
				alertMsg.warn("配送任务号的长度为10位！");	
				return false;
			}else if(distributeTaskNo.length==18){
				var year = "20"+distributeTaskNo.substr(1,2);
				var month = distributeTaskNo.substr(3,2);
				var day = distributeTaskNo.substr(5,2);
				var createDate = new Date(year+'/'+month+'/'+day);
				var dateFlag ;
				if(createDate.getFullYear() == year && (createDate.getMonth() + 1) == month && createDate.getDate() == day){
					dateFlag = true;
				}else{
					dateFlag = false;
				}
				if(dateFlag==false){
					alertMsg.warn("请输入正确的配送任务号");
					return false;
				}
			}
		}else{
			alertMsg.warn("配送任务号不能为空");
			return false;
		}
	});
});
function validateCheckBoxByBlank(obj){
	var $obj = $(obj);
	//获取选择的数据的validStatus值
	if($("input[name='blankCardReceivingtasked']:checked").length < 1){
		 alertMsg.warn("您未选择数据！")	
		 return false;
	}
} 

</script>	
<div class="pageHeader ">
	<form id="pagerForm" method="post" action="inventoryMagOfReceiveRejectCardByCenter/getRejectCardReceiving" class="pageForm required-validate" onsubmit="return validateCallback(this,getRejectCardReceiving);">
		<input type="hidden" name="pageNum" value="" /> 
		<input type="hidden" name="numPerPage" value="" />
		<!-- <input type="hidden" name="pageCount" value="" /> -->
		<div class="searchBar">
		<table class="searchContent">
			<tr>
				<td><label>配送任务号：</label></td>
				<td><input id="rejectDistributeTaskNoByReceiving" name="rejectDistributeTaskNoByReceiving" type="text" size="20" ></td>
			</tr>
            <tr>
            	<td><label>网点编号：</label></td>
				<td><input  name="netpointnumber" class="" type="text" size="20"  readonly="readonly" unselectable="on"/></td>		
			</tr> 
			<tr>
				<td><label>员工编号：</label></td>
				<td><input  name="tellernumber" class="" type="text" size="20"  readonly="readonly" unselectable="on"/></td>					
			</tr> 
		</table>
		<div class="subBar">
			<ul> 
				<li>
				<div class="buttonActive" ><div class="buttonContent" ><button id="queryTaskByRejectDistribute" type="submit">查询</button></div></div>
				</li>
			</ul>
		</div>
		</div>
	</form>	
</div>
<form method="post" action="inventoryMagOfReceiveBFByCenter/blankAndRejectCardReceivingRegister" class="pageForm required-validate" onsubmit="return validateCallback(this,printViewPageAjaxDone);" >


	 <input id="storageModdeByTurnIn" name="storageModdeByTurnIn" type="hidden" value="03">
	 <div class="pageContent" >
	 <div id="rejectcard">
		<table class="table" width="760" layoutH="320">
			<thead>
				<tr>
					<th width="5%" align="center">全选<input type="checkbox" id="cardReceiv" name="cardReceivingtaskedByTotal" group="blankCardReceivingtasked" class="checkboxCtrl"></th>
					<th width="5%" align="center">序号</th>
					<th width="10%" align="center">市民卡号</th>
				</tr>
			</thead>
			<tbody id="rejectCardReceiving">
			</tbody>
		</table>
		</div>
	 <div class="panelBar">
		<div class="pages">
			<span>显示</span>
			<select class="combox" id="numPerPageByIM" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value},'rejectCardReceiving',getRejectCardReceiving)">
				<option value="10">10</option>
				<option value="20">20</option>
				<option value="50">50</option>
				<option value="100">100</option>
			</select>
			<span id="totalCountByRejectCardReceivingn" >条，共0条</span>
		</div>
		<div callback='getRejectCardReceiving' id="paginationByRejectCardReceiving" rel="rejectCardReceiving" class="pagination" targetType="navTab" totalCount="100" numPerPage="10" pageNumShown="1" currentPage="1"></div>
	</div>
	<div class="formBar">	
			<ul>
				<li>
				<div class="buttonActive" ><div class="buttonContent" ><button id="subTask" onclick="return validateCheckBoxByBlank(this)" type="submit">入库</button></div></div>
				</li>
			</ul>			
	</div>
</div>
</form>

	



